package co.fitstart.tencent.customer.rao;

import java.util.Map;

import org.springframework.web.multipart.MultipartFile;

import com.demo2do.core.entity.result.HttpResult;
import com.demo2do.core.http.HttpContentType;
import com.demo2do.core.http.HttpMethod;
import com.demo2do.core.http.annotation.Rao;
import com.demo2do.core.http.annotation.RaoBody;
import com.demo2do.core.http.annotation.RaoConfig;
import com.demo2do.core.http.annotation.RaoMapping;
import com.demo2do.core.http.annotation.RaoParam;

/**
 * 
 * @author houtao
 *
 */
@Rao
public interface WechatInvoiceRao {
	
	@RaoConfig(code = "errcode", message = "errmsg", parse = true)
    @RaoMapping(value = "https://api.weixin.qq.com/cgi-bin/ticket/getticket", method = HttpMethod.GET)
    public HttpResult getCardTicket(@RaoParam("access_token") String accessToken, @RaoParam("type") String type);
	
	@RaoMapping(value = "https://api.weixin.qq.com/card/invoice/getauthurl", method = HttpMethod.POST)
    public HttpResult getAuthUrl(@RaoParam("access_token") String accessToken, @RaoBody Map<String, Object> params);
	
	@RaoMapping(value = "https://api.weixin.qq.com/card/invoice/insert", method = HttpMethod.POST)
    public HttpResult insert(@RaoParam("access_token") String accessToken, @RaoBody Map<String, Object> params);
	
	@RaoMapping(value = "https://api.weixin.qq.com/card/invoice/platform/setpdf", method = HttpMethod.POST)
    public HttpResult upload(@RaoParam("access_token") String accessToken, @RaoBody(contentType = HttpContentType.WILDCARD) MultipartFile multipartFile);
}
